package config

import (
	"github.com/BurntSushi/toml"
	"github.com/caarlos0/env/v6"
)

var C = DefaultConfig()

func Loadfromtoml(filepath string) error {
	_, err := toml.DecodeFile(filepath, C)
	if err != nil {
		return err
	}
	return nil
}

func Loadfromenv() error {
	err := env.Parse(C)
	if err != nil {
		return err
	}
	return nil
}
